/**
 * 
 */
package cn.gov.msa.service;

import java.io.IOException;

import org.dom4j.DocumentException;
import org.springframework.stereotype.Service;
import org.xmlpull.v1.XmlPullParserException;

import cn.gov.msa.util.PropertiesTools;
import cn.gov.msa.util.UserUntil;
import cn.gov.msa.util.WebServiceTools;
import net.sf.json.JSON;
import net.sf.json.JSONObject;

/**   
* @Title: DictService.java 
* @Package cn.gov.msa.service 
* @Description: TODO(用一句话描述该文件做什么) 
* @author 何宇江  
* @date 2018年2月24日 上午11:49:34 
*/

public class DictService {

	private static String url  = PropertiesTools.readProperties("gahWS.url");
	private String methods = PropertiesTools.readProperties("gahWS.methods");
			
	public String GetDictDetail(String dictcode,String pitemcode, String itemname) throws Exception {
		String result = "";
		
		
		JSONObject param = new JSONObject();
		param.put("dictcode", dictcode);
		if(null!=pitemcode)
			param.put("pitemcode", pitemcode);
		if(null!=itemname)
			param.put("itemname", itemname);
		param = UserUntil.PutUserMsg(param);
		String[] parameter = new String[]{"DKS101", param.toString()};
		
		result = WebServiceTools.getDatasByUrl(url, methods, parameter);
		
		return result;
	}
}
